<form id="pagerForm" method="post" action="">
	<input type="hidden" name="pageNum" value="{$pageNum}" />
	<input type="hidden" name="numPerPage" value="{$numPerPage}" />
	<input type="hidden" name="orderField" value="{$orderField}" />
	<input type="hidden" name="orderDirection" value="{$orderDirection}" />
	<input type="hidden" name="keywords" value="{$keywords}" />
	<input type="hidden" name="sfield" value="{$sfield}" />
	<input type="hidden" name="platform" value="{$platform}" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="" method="post">
		<input type="hidden" name="m" value="{$module_name}" />
		<input type="hidden" name="a" value="{$action_name}" />
	<div class="searchBar">
		<ul class="searchContent">
			<li style="width:210px;">
				<label style="width:60px;">关键字：</label>
				<input type="text" class="autoinput" name="keywords" value="{$keywords}" style="width:120px;"/>
			</li>
			<li style="width:100px;">
			<select name="sfield" class="">
				<option value="all" {if $wherefields=='all'}selected="selected"{/if}>全部</option>
				<option value="of.userid" {if $wherefields=='userid'}selected="selected"{/if}>用户ID</option>
				<option value="of.order_id" {if $wherefields=='order_id'}selected="selected"{/if}>订单ID</option>
				<option value="o.sn" {if $wherefields=='sn'}selected="selected"{/if}>订单编号</option>
			</select>
			<input type="hidden" name="sfield_name" value="of.order_id,of.userid,o.sn" />
			</li>
			<li style="width:80px;">
				<select name="platform" class="combox">
					<option value="">全部</option>
					<option value="SMW01" {if $platform=='SMW01'}selected="selected"{/if}>云采购</option>
					<option value="91YUNGOU" {if $platform=='O2O'}selected="selected"{/if}>云购</option>
				</select>
			</li>
			<li style="width:100px;">
				<select name="pay_status" class="combox">
					<option value="" >全部</option>
					<option value="2" {if $status=='2'}selected="selected"{/if}>未退款</option>					
					<option value="1" {if $status=='1'}selected="selected"{/if}>已退款</option>
				</select>
			</li>
			<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
		</ul>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="{:U('User/add',$param)}" target="dialog" width="580" height="350" rel="User_add"><span>添加用户</span></a></li>
			<li><a class="edit" href="{:U('User/edit')}&id={sid_dv}" target="dialog" width="580" height="350" warn="请选择一个用户"><span>修改用户信息</span></a></li>
			<li><a class="icon" href="{:U('User/detail')}&id={sid_dv}" target="dialog" warn="请选择一个用户"><span>查看用户信息</span></a></li>
			<li><a class="icon" href="javascript:$.printBox('order_list')"><span>打印</span></a></li>
		</ul>
	</div>
	<div id="order_list">
		<table class="list" width="98%" targetType="navTab" layoutH="96">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="ids[]" class="checkboxCtrl"></th>
				<th width="60" orderField="id" {if $orderField=='id'}class="{$orderDirection}"{/if}>编号</th>
				<th width="80" orderField="sn" {if $orderField=='sn'}class="{$orderDirection}"{/if}>订单号</th>
				<th>备注</th>
				<th width="50" orderField="of_userid" {if $orderField=='of_userid'}class="{$orderDirection}"{/if}>用户</th>
				<th width="50" orderField="platform" {if $orderField=='platform'}class="{$orderDirection}"{/if}>平台</th>
				<th width="80" orderField="platform" {if $orderField=='platform'}class="{$orderDirection}"{/if}>类型</th>
				<th width="50" orderField="subject" {if $orderField=='subject'}class="{$orderDirection}"{/if}>科目</th>
				<th width="50" orderField="value" {if $orderField=='value'}class="{$orderDirection}"{/if}>金额</th>
				<th width="80" orderField="of_status" {if $orderField=='of_status'}class="{$orderDirection}"{/if}>退款状态</th>
				<th width="150" orderField="ctime" {if $orderField=='ctime'}class="{$orderDirection}"{/if}>更新时间</th>
				<th width="120">操作</th>
			</tr>
		</thead>
		<tbody>
<volist name="list" id="vo">
			<tr target="sid_dv" rel="{$vo['id']}">
				<td><input name="ids[]" value="{$vo['id']}" type="checkbox"></td>
				<td>{$vo['id']}</td>
				<td><a title="{$vo['sn']} 订单查看" target="dialog" width="780" height="650" rel="Order_detail_{$vo['id']}" href="{:U('Order/detail',array('id'=>$vo['id']))}">{$vo['sn']}</a></td>
				<td>{$vo['remark']}</td>
				<td>{$vo['userid']}</td>
				<td>{$vo['platform']}</td>
				<td>{$action[$vo['action']]}</td>
				<td>{$vo['subject']}</td>
				<td>{$vo['value']/100}</td>
				<td>{if $vo['of_status']==0}未操作{else}已操作{/if}</td>
				<td>{if $vo['ctime']=='0'}-{else}{$vo['ctime']|date="Y-m-d H:i:s",###}{/if}</td>
				<td>
				{if $vo['of_status']==0}
					<a title="操作退款,请不要操作错了，该操作不可逆。" target="ajaxTodo" href="{:U('Finance/do_bak',array('id'=>$vo['of_id'],'act'=>$vo['action'],'orderid'=>$vo['id'],'sn'=>$vo['sn'],'platform'=>$vo['platform']))}" {if $vo['of_status']==1}class="btnDel"{else}class="btnSelect"{/if}>操作</a>
					<a title="删除操作,请不要操作错了，该操作不可逆。" target="ajaxTodo" href="{:U('Finance/delall',array('id'=>$vo['of_id'],'act'=>$vo['action'],'orderid'=>$vo['id'],'sn'=>$vo['sn'],'platform'=>$vo['platform']))}" class="btnDel">操作</a>
				{else}
					已退款
				{/if}
				</td>
			</tr>
</volist>
		</tbody>
	</table>
	</div>
<include file="Index:pages" />
</div>
